﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Bootstrap风格的消息框</title>
    <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" />
</head>
<body>
    <div class="container">
        <button id="btn1" type="button" class="btn btn-primary" onclick="showAlert();">Alert</button>
        <button id="btn1" type="button" class="btn btn-primary" onclick="showConfirm();">Confirm</button>
    </div>
    <script src="scripts/jquery-1.11.0.min.js"></script>
    <script src="bootstrap/js/bootstrap.min.js"></script>
    <script src="scripts/bootbox.min.js"></script>
    <script type="text/javascript">
        function showAlert() {
            bootbox.alert("您点击了Alert按钮！");
        }
        function showConfirm() {
            bootbox.confirm("您确定要执行本操作吗？",
                function (choice) {
                    if (choice) {
                        bootbox.alert("您选择了确定");
                    } else {
                        bootbox.alert("您选择了取消");
                    }
                });
        }
    </script>
</body>
</html>
